﻿using System;
using System.Collections.Generic;
using System.Configuration;
namespace MasoQna.Infrastructure.Auth
{
    public class TwitterConsumer : AbstractConsumer
    {
        public TwitterConsumer()
        {
            ConsumerKey = ConfigurationManager.AppSettings["twitterConsumerKey"];
            ConsumerSecret = ConfigurationManager.AppSettings["twitterConsumerSecret"];
            RequestTokenEndPoint = "http://twitter.com/oauth/request_token";
            UserAuthorizationEndPoint = "http://twitter.com/oauth/authenticate";
            AccessTokenEndPoint = "http://twitter.com/oauth/access_token";
            imagePath = "/Content/image/twitter.png";
        }

        public override string GetUserId(IDictionary<string, string> responseExtraData)
        {
            return responseExtraData["user_id"];
        }

        public override string ImagePath
        {
            get { return imagePath; }
        }

        private string imagePath;
    }
}